import 'package:flutter/material.dart';
import '../http/cache.dart';
import '../http/containers.dart';
import 'package:httpplugin/httpplugin.dart';
import 'http/http_channel.dart';
import 'package:flutter_tool/flutter_tool.dart';
import 'enter_point_page.dart';

void main() async{
  WidgetsFlutterBinding.ensureInitialized();
  InstanceInitialize.initializeInstance();
  var httpChannel = HttpChannel();
  await httpChannel.setUpChannel(config: const HttpConfig());
  CustomInstanceManager.instance.setInstance(httpChannel);
  HttpMidBuffer.buffer.addTickContainers(AppRequest.request);
  var cache = AppCacheManager();
  await cache.cacheInitialize();
  CustomInstanceManager.instance.setInstance(cache);
  runApp(const EnterPointPage());
}
